<?php 
/** @name : DummyManager.php via KOOK-FRAMEWORK - @author : theerasak.p - @since : 13 �.�. 2554 18:52:45 - @encoding : UTF-8 */
require_once Path::interfaces("manager");
require_once Path::models("dummy");

class DummyManager extends DummyModel implements ManagerInterface
{

	public function deleteManager($instance)
	{
		return $this->getDBConnection()->delete($instance);
	}
		
	public function saveManager($instance,$versionIgnore=FALSE)
	{
		return $this->getDBConnection()->save($instance,$versionIgnore);
	}
	
	public function uploadManager($instance)
	{
		return $this->getDBConnection()->save($instance);
	}

	public function findManager($instance)
	{
		return $this->getDBConnection()->find($instance);
	}

	public function findAllManager($instance)
	{
		return $this->getDBConnection()->findAll($instance);
	}
	
	public function findNativeManager()
	{
		return $this->getDBConnection()->findNative(
			"Dummy,DummyUser", 
			$this->XMLSQL($this->database['modelName'], "dummyJoinDummyUser")
		);
	}

	public function findAllNativeManager()
	{
		return $this->getDBConnection()->findAllNative(
			"Dummy,DummyUser", 
			$this->XMLSQL($this->database['modelName'], "dummyJoinDummyUser")
		);
	}

	public function findCountNativeManager()
	{
		return $this->getDBConnection()->findNative(
			"Custom[count]", 
			$this->XMLSQL($this->database['modelName'], "findCountNative",":dummyId=1")
		);
	}
	
	public function findXMLManager($instance)
	{
		echo $this->XMLSQL("Standard","dummy",":dummyId=12");
	}
}
?>